﻿using System;
using System.Linq;
using Test.DAL;
using Test.IDAL;

namespace Test
{
    public partial class ClassInfoDetial : System.Web.UI.Page
    {
        IClassInfoDAL bll = new ClassInfoDAL();
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);
            var result=bll.Single(id);
            if (result.States)
            {
                Model.ClassInfo info = result.Data;
                if (info != null)
                {
                    Label1.Text = info.Name;
                }
            }
            else {
                Response.Write("<script>alert('" + result.message + "')</script>");
            }
            
            
        }
    }
}